#ifndef _MY_GPIO_H_
#define _MY_GPIO_H_




#ifdef MATLAB_MEX_FILE
#include "tmwtypes.h"
#define GPIO_INPUT		0
#define GPIO_OUTPUT		1
#define GPIO_PUSHPULL   0
#define GPIO_PULLUP		(1 << 0)
#define GPIO_INVERT		(1 << 1)
#define GPIO_OPENDRAIN	(1 << 2)
#define GPIO_SYNC		(0x0 << 4)
#define GPIO_QUAL3		(0x1 << 4)
#define GPIO_QUAL6		(0x2 << 4)
#define GPIO_ASYNC		(0x3 << 4)

//CPU pin masters for GPIO_SelectPinMux()
#define GPIO_MUX_CPU1		0x0
#define GPIO_MUX_CPU1CLA	0x1
#define GPIO_MUX_CPU2		0x2
#define GPIO_MUX_CPU2CLA	0x3

#else
#include "F2837xD_device.h"     // F2837xD Headerfile Include File
#include "F2837xD_Examples.h"   // F2837xD Examples Include File
#include "F2837xD_Gpio_defines.h"
#include "rtwtypes.h"
#include "F28x_Project.h"
#endif

void My_Gpio_Config(uint16_T pin, uint16_T output, uint16_T flags, uint16_T cpu);
void My_Gpio_Write(uint16_T pin, uint16_T outVal);
uint16_T My_Gpio_Read(uint16_T pin);

#endif

